
file_path = 'D:/工作/3、需求/9、数据分析驾驶舱数据支撑/22、生产问题处理2024-08-08/生产数据/2024-08-12/贷款回款数据.txt'
file = open(file_path, 'r', encoding='UTF-8')
for f in file:
    f = f.strip()
    f_list = f.split(',')
    # print(f_list)
    datetime = f_list[0]
    loanReturnCount = f_list[1]

    # print(f'{datetime}, {loanReturnCount}')
    update_sql = f"update lc0001 set LOANRETURNCOUNT = {loanReturnCount} where belogtodate = '{datetime}';";
    print(update_sql)
